//
//  Print.m
//  Charles
//
//  Created by Charles on 2019/5/30.
//  Copyright © 2019 charles. All rights reserved.
//

#import "Print.h"

@implementation Banner

- (instancetype)initWithString:(NSString *)string{
    if (self = [super init]) {
        self.string = string;
    }
    return self;
}

- (void)showWithPattern {
    NSLog(@"( %@ )",self.string);
}

- (void)showWithAster {
    NSLog(@"* %@ *",self.string);
}

@end

@implementation PrintBanner

- (instancetype)initWithString:(NSString *)string {
    if (self = [super initWithString:string]) {
        
    }
    return self;
}

- (void)printWeak {
    [self showWithPattern];
}

- (void)printStrong {
    [self showWithAster];
}

@end

@implementation Print

- (void)printWeak {
    
}

- (void)printStrong{
    
}

@end

@implementation PrintBanner2

- (instancetype)initWithString:(NSString *)string {
    if (self = [super init]) {
        self.banner = [[Banner alloc]initWithString:string];
    }
    return self;
}

- (void)printWeak {
    [self.banner showWithPattern];
}

- (void)printStrong {
    [self.banner showWithAster];
}

@end
